Copyright ã1992 by Scott Hess.  All Rights Reserved.

Stuart Preferences

Stuart has a very large number of preferences that are stored in the defaults database and also may be stored by each emulation window.  This section gives a list of the preference names, with possible values, and pointers to where the preference may be set from within Stuart.

The format of the section is:

Name	Type(Default)
Descriptive Text.

Where Name is a preference name, Type is what type the preference is, and Default is the default value for the preference if there is no value in the defaults database.  A Type of BOOL requires a "YES" or "NO", integer requires a integer value which may be positive or negative unless otherwise noted.  String may be any string of characters.  Char requires the ASCII value for a character (for instance, 97 for `a').  A path is a string which specifies a file in the filesystem, and may begin with `~/'.  Pathlist is a list of paths separated by a `:' character.  If a string is given enclosed in double-quotes, then that string may be used explicitely as a value for the preference.

AppendNewline	"Commands", BOOL(NO)
Causes Stuart to send a newline during filename pasting.  When set to "Commands", a newline is only sent after cd or pushd commands are pasted, while if YES a newline is always sent.  If NO, a newline is never sent.  In combination with PrependControl-u, this preference can make filename pasting much cleaner.  Set from the Paste pane.

Backwrap	BOOL(YES)
vt100s allow a mode where text will automatically wrap-around when it reaches the right hand margin.  This is useful for some `dumb' shells which are not able to take advantage of vt100 sequences to provide smart editing functionality.  Unfortunately, there is no mode provided whereby the user can backspace from the wrapped line back up to the original part of the line.  Backwrap allows this to occur by making a slight change to how the emulator works.  Set from the Emulation pane.

ClosePrompt	BOOL(NO)
Determines whether Stuart will prompt the user before closing a window if there is still a running subprocess.  Set from the Global pane.

Columns, Lines	integer(80), integer(24)
Specifies the size of the window in characters.  Set from the Window pane, but more easily set by direct manipulation of a window's resize bar.

CommandKey	char(` ')
Allows the association of a Command combination with a window in the Windows menu.  No attempt is made to test of conflicts in the character used.  The default value, ` ' (Space), means that there is no Command character associated with the window.  Set from the Window pane.

CopyOnDrop	BOOL(YES)
If YES, when a drag&drop file is pasted to Stuart, a copy is also placed on the filename Pasteboard.  Set from the Paste pane.

CshQuoting	"Commands", BOOL(Commands)
Determines how odd characters in pasted filenames are handled.  If YES, these characters are quoted using `\' in a manner compatible with csh.  If "Commands", then only pastes which include cd or pushd commands are quoted.  If NO, nothing is quoted.  Set from the Paste pane.

DeleteSendsBackspace	BOOL(NO)
Determines whether the Delete key will send DEL or BS to the window when pressed.  Set from the Emulation pane.

Directory	path(~)
Directory contains the startup directory for new windows.  If Directory is `.', then the directory Stuart was launched from is used as the startup directory.  If Stuart was launched from the Workspace, Stuart's launch directory is `~'.  On a per-window basis, Directory may be modified using OSC escape sequences.  Set from the Subprocess pane.

DisplayGraphicChars	BOOL(NO)
In certain modes, the vt100 provides an alternate set of characters for use in line-drawing and other pursuits.  Stuart currently does not implement a full set of graphics characters, but Stuart does map in those characters for which the window's font has a close match.  If the terminal is accidentally placed into graphic character mode, the output from a shell or other program may be quite bizarre and is certainly unreadable.  DisplayGraphicChars determines whether these graphics characters are displayed or not.  Set from the Emulation pane.

Emulation	"vt100","vt52" (vt100)
As a consequence of emulating a vt100, Stuart implements vt52 emulation also.  Emulation controls which is used in the window.  Admittedly, the choices currently are limited - there'll be more in the future!  Set from the Emulation pane.

EnvironFile	path()
Specifies a Stuartrc format file which contains additional environment variable settings for Stuart to apply to new windows.  Set from the Subprocess pane.

FloatingWidth	BOOL(YES)
vt100 terminals have two modes of display.  One provides the standard 80x24 display.  The other provides a 132x80 column display.  There is an escape sequence which allows software to toggle the terminal between these two displays.  On a VMS system, the user can tell the system what width the terminal is by using

set term/width=XXX

Unfortunately, the system only knows about the two widths - since Stuart provides for many more display widths than a real vt100, this can cause a problem.  Consider the case where the user has a 160 character terminal open.  If the user executed

set term/width=160

the system sends the code which puts the terminal into 132 column mode, since that's the best it could do with a real vt100.  FloatingWidth tells the emulator to only allow escape sequences to change the window width if the requested width is larger than the current width.   Set from the Emulation pane.

KeyboardFocus	BOOL(NO)
When KeyboardFocus is YES, Stuart will force the scrollbar to scroll to the bottom when new text is entered into the window.  Set from the Window pane.

Keypad	BOOL(NO)
A real vt100 keypad can send some special character sequences for the subprocess to interpret.  Notably the top row is a set of function keys which always send special escape sequences, and the keypad can be put into a mode in which the rest of the keypad also sends special sequences.  If Keypad is YES, Stuart emulates a vt100 keypad, if NO, Stuart does no emulation and just sends the regular NeXT codes.  Alternate works as a temporary toggle which allows access to whichever mode the keypad is currently not in.  For instance, if Keypad is NO, then Alternate-Keypad-` will send the vt100 PF1 sequence rather than the character `.  Set from the Emulation pane.

KeypadAltToggle	BOOL(YES)
Determines whether the Keypad mode may be toggled using the Alternate key.  For many non-US keyboards, some keycodes are only available using Alternate-Keypad combinations, and Stuart's keypad processing is undesired in that case.  Set from the Emulation pane.

Lines	See Columns

LogUtmp	BOOL(YES)
When creating a new subprocess window, Stuart performs some bookkeeping functions for the system.  If LogUtmp is YES, Stuart logs an entry to the /etc/utmp system file.  This file is referenced by some command-line programs, including finger(1), talk(1), and who(1).  These programs may not work as expected without a utmp entry.  Stuart can only create utmp entries if the slog tool program is installed correctly.  Set from the Subprocess pane.

MakeMainOnDrop	BOOL(YES)
If YES, when a drag&drop file is pasted to Stuart the, Stuart becomes the foreground application with the window dropped into as the main window.  Set from the Paste pane.

MaxPasteLines	"Off", integer(4)
While pasting data into Stuart windows can be very useful, oftentimes a simple mistake can cause you to accidentally attempt to paste a large amount of text that the subprocess will not understand, and chaos will result.  For instance, the csh usually doesn't appreciate having C source code pasted to its command-line.  MaxPasteLines allows the user to specify a limit on the number of lines to paste without prompting the user whether or not they really wish to paste the information.  Set from the Paste pane.

MaxPasteSize	"Off", integer(256)
MaxPasteSize works on the same theory as MaxPasteLines, except that it puts a limit on the size of the lines, in characters.  Generally, most shells will not accept lines of more than 256 characters.  Set from the Paste pane.

Meta	-1, 0, 27(27)
Many workstation and terminal keyboards provide a `meta' key which works similarly to the Shift key to modify keystrokes in such a way that programs can interpret them differently from regular unmodified keys.  The Meta preference allows the Alternate key to work like a meta key for the main section of the NeXT keyboard.  If Meta is set to -1, the high bit is set on keystrokes generated while Alternate is depressed.  If Meta is set to 27, each keystroke is prefixed with the ASCII escape character (ESC) before being sent.  If Meta is set to 0, Alternate is disabled as the Meta key.  This last can be important when Stuart is used with a non-US keyboard.

Meta defaults to 27 because many subprocesses will not correctly receive the high-bit meta indicator whereas they will correctly receive the ESC prefix indicator.  To fix this, you must tell the pty driver not to strip the high bit by using

stty pass8

Also, many remote access programs such as rlogin, tip, and telnet, will default to stripping the high bit from the input, in which case ESC works much better than setting the high bit.  In nearly all cases, both settings are identical.  Set from the Emulation pane.

Miniaturized	BOOL(NO)
Miniaturized is not a true preferences value.  It is used to indicate miniaturized status of a window from with Stuart's Stuartrc file.  Miniaturized is also available for windows created using the soil command (see Utilities/soil).

MiniTitle	string(%{Basename} (%{Device}))
Sets the title for use in the miniwindow titlebar.  The meta-sequences available are exactly those available with the Title preference.  Set from the Window pane.

MouseFocus	BOOL(NO)
MouseFocus provides for a poor emulation of the X Window system's move-to-focus abilities.  With MouseFocus YES, Stuart will track the mouse and bring the window to the foreground if the mouse remains over the window for a short length of time without moving.  Set from the Window pane.

NXFixedPitchFont	string(Ohlfs)
NXFixedPitchFontSize	integer(10)
Specifies the font Stuart will use for the window.  Set from the Window pane, but more easily set by direct manipulation of a window from the Font Panel.

PasteOnDrop	"cd", "pushd", BOOL(cd)
PasteOnDrop determines the action that Stuart will take when a file is dragged from the Workspace and dropped into the Stuart window.  With values "cd" and "pushd", the file is assumed to specify a directory, and a cd or pushd command is pasted with that directory as its argument.  If PasteOnDrop is YES, then the filename(s) are pasted as-is with no command added.  If NO, the window will not accept drag&drop.  Set from the Paste pane.

PasteSelCopies	BOOL(NO)
Normally, the Edit/Paste/Paste Selection command short-circuits the Pasteboard and pastes the current selection directly.  When PasteSelCopies is YES, a copy is sent to the Pasteboard, also, in which case Paste Selection is equivalent to a Copy followed by a Paste.  Set from the Paste pane.

PrependControl-u	"Commands", "NO"(NO)
For most shells, Control-u (NAK) causes the current command-line to be erased.  PrependControl-u causes this character to be sent before a command derived from a filename paste.  This is useful when filename pasting sends a cd or pushd command, because it then causes the command itself to be the first thing on the line.  In combination with AppendNewline, this preference can make filename pasting much cleaner.  Set from the Paste pane.

PtyOwnership	BOOL(YES)
When creating a new subprocess window, Stuart performs some bookkeeping functions for the system.  If PtyOwnership is YES, Stuart fixes the permissions on the subprocess' tty device so that the user owns the device.  This is important for some command-line programs, including mesg(1), and biff(1).  These programs may not work as expected without the permissions changes.  Stuart can only change permissions on the tty device if the slog tool program is installed correctly.  Set from the Subprocess pane.

QuitPrompt	BOOL(YES)
Determines whether Stuart will prompt the user before quitting the program if there are still running subprocesses.  Set from the Global pane.

Reverse	BOOL(NO)
Indicates whether the window is in reverse-video mode or not.  The grays in the window are also affected by the ReverseBlack preference.  Set from the Window pane.

ReverseBlack	BOOL(NO)
If reverse-video is active, ReverseBlack indicates whether the Stuart will display non-inverse text as black on light gray (NO), or white on black (YES).  Set from the Window pane.

Scrollback	BOOL(YES)
Determines whether the window will contain a scrollbar on the left side and allow a scrollback buffer where scrolled text is stored for later recall.  Set from the Window pane.

Shelf	"NO", "", pathlist(NO)
Determines whether or not a window contains a Shelf, and what that Shelf contains.  If the preference is "", then the Shelf contains only the user's home directory.  If "NO", there is no Shelf.  Otherwise, the preference gives a colon-separated list of files for placement on the Shelf.  Set from the Paste pane.

Shell	string(csh)
Shell specifies a command to run as a subprocess in windows.  A Shell may be fully specified with an absolute pathname, or it may be specified relative to the list of directories in the ShellPaths preference.  Shell may be a full command-line rather than a simple filename.  Words are separated by spaces.  Double-quotes (") or single-quotes (') may be used to quote words containing spaces.  `\' may be used to escape `"' or `'' within quoted words, and also to escape itself.  Set from the Subprocess pane.

ShellPaths	pathlist(/usr/local/bin:/bin:/usr/ucb:
	/usr/bin:/LocalApps:/NextApps:
	/NextDeveloper/Demos:~/Apps)
ShellPaths primes the PATH environment variable for subprocesses.  Also, it provides the list of directories to search for the Shell command if that command does not specify an absolute pathname.  Set from the Global pane.

ShortLineSpacing	BOOL(YES)
When the first version of Stuart was written, the Terminal1.0 program uses a tight line-spacing algorithm which allowed more lines to be visible than the font itself specifies.  Terminal2.0 uses a looser line-spacing.  ShortLineSpacing allows the user to choose between the two spacing algorithms.  Set from the Window pane.

SourceDotLogin	BOOL(YES)
Certain shell programs differentiate between a login shell and a regular shell.  A login shell usually will `source' (load) a special file on startup, which in csh is called .login.  When SourceDotLogin is YES, the shell is run in such a manner that .login, or the appropriate file for the shell in question, is sourced on startup.  Note that some programs, such as rlogin(1), do not work correctly with SourceDotLogin turned on.  Set from the Subprocess pane.

Stuartrc	path(~/.Stuartrc)
Specifies a Stuartrc format file which contains specifications for windows which Stuart will automatically start up on launch.  Set from the Global pane.

TabWraps	BOOL(YES)
From a vt320 manual:

HT	Moves the cursor to the next tab stop.  If there are no more tab stops, the cursor moves to the right margin.  HT does not cause text to auto wrap.

In many instances, this interpretation can cause very non-intuitive results when the user is working with tab-separated text.  TabWraps allows tab characters to auto wrap just like any other character.   Set from the Emulation pane.

Term	string(vt100)
Used to prime the TERM environment variable for new windows.  Set from the Subprocess pane.

Termcap	path(/etc/termcap)
Used to prime the TERMCAP environment variable for new windows.  Set from the Subprocess pane.

TermcapSpoofing	BOOL(YES)
The standard NeXTSTEP2.0 vt100 termcap entry has some flaws in the terminal initialization sequence (is).  Terminal2.0 fixed these flaws by breaking the emulation in a minor way.  TermcapSpoofing allows Stuart to emulate this change, while still allowing the user to turn off the emulation of the change for compatibility's sake.  Set from the Emulation pane.

TestExit	BOOL(NO)
When subprocesses exit, Stuart usually closes their window.  If the subprocess exited unexpectedly with an error, it may be that there is useful error message output, which would be impossible to read in the time between the subprocess' exit and the closing of the window.  If TextExit is YES, Stuart will not close the window if the subprocess exits with a non-zero value, or if it terminates due to a signal.  Set from the Subprocess pane.

Title	string(%{Shell} (%{Device}) %{Columns}x%{Lines})
Sets the title for use in the window titlebar.  `%{...}' sequences are `meta' sequences that insert data from the window's local preferences set into the title.  `...' may be the name of any preference, and the value for the preference will replace the entire `%{...}' sequence.

There are two psuedo-preferences that are availiable with these sequences.  `Basename' is the last component of the command that Shell contains.  For instance, the Basename of `/usr/ucb/talk scott@nic.gac.edu' would be `talk'.  The other psuedo-preference is `Device', which is the last component of the pathname to the device the subprocess received.  Set from the Window pane.

Translate	BOOL(YES)
The Unix operating system uses the newline (also known as linefeed) character to separate lines.  Since NeXTSTEP is based on Unix, NeXTSTEP uses newline to separate lines on the Pastboard.  DEC's VMS operating system, meanwhile, uses newline for delete-previous-word, which has unfortunate consequences when text is pasted into a Stuart window that is logged into a VMS system.  Translate causes Stuart to translate newline characters to carriage return characters when text is pasted, which works as expected for both VMS and for Unix.  Set from the Paste pane.

WinLocDx, WinLocDy	integer(25), integer(-25)
Gives the offset between windows which are brought up without explicit location specifications.  Set from the Global pane.

WinLocX, WinLocY	integer(100), integer(600)
Gives the position of the upper-left corner of the window relative to the lower-left corner of the coordinate space.  A screen contains 1120 pixels horizontally and 832 pixels vertically.  Set from the Window pane, but more easily set by direct manipulation of a window.

WriteDirToStuartrc	BOOL(NO)
When the file specified by Stuartrc is written to, all preferences that are different from the standard ones are written to the file.  If the Directory preference is different, it would normally be written, also.  But, in general, Directory may not make sense as an element in the file.  This preference determines whether or not Directory is written, if it differs.  Set from the Global pane.

WriteMiniToStuartrc	BOOL(NO)
Generally, Stuart does not write the current miniaturized status of windows to Stuartrc, because the miniaturized status is not a standard preference.  When WriteMiniToStuartrc is YES, then for all miniaturized windows, a Miniaturized entry is written when Stuartrc is written.  Set from the Global pane.

WriteStuartrc	BOOL(NO)
Determines whether Stuart will write the current window setup to the file specified by Stuartrc when Stuart is terminated due to Workspace logout.  Set from the Global pane.

WriteStuartrcOnQuit	BOOL(NO)
Determines whether Stuart will write the current window setup to the file specified by Stuartrc when Stuart is quit by the user.  Set from the Global pane.